package com.example.rest.job;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.base.dict.Dict;
import com.example.base.jdbc.DBSql;
import com.example.base.job.IJob;
import com.example.base.job.IJobMap;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class BaseJob implements IJob {

    @Override
    public String getDesc() {
        return "测试job";
    }

    @Override
    public void exec(IJobMap iJobMap) {
        log.info("基础job执行中 :: baseAppName");
        log.info("job的执行参数 {}",iJobMap.getParams());
        log.info("动态job::--->");
        JSONArray array=Dict.getData("sex");
        JSONObject object=Dict.getData("sex","1");
        log.info(JSONObject.toJSONString(array));
        log.info(JSONObject.toJSONString(object));
    }

    @Override
    public String getJobName() {
        return "job名称";
    }
}
